import request from './request'
import auth from '../utils/auth'

export default {
    // 创建班级
    createClass(data) {
        return request.post('/class/create', {
            teacherId: auth.getUserId(), // 自动从token获取userId
            className: data.className,
            majorId: data.majorId,
            number: data.number
        })
    },
    getMajorList() {
        return request.get('/major/list')
    }
}